package hr_project.hr.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import hr_project.hr.entity.Right;

public interface IRightDao {

	//查找所有父权限
	public List<Right> getParentRight();
	//根据父亲id查找子权限
	public List<Right> getRightByPid(long pid);
	
	
	//查找所有父权限
	public List<Right> getPRightByRoid(long rid);
	//根据父亲id和角色id查找子权限
	public List<Right> getRigByPidAndRoid(@Param("rid")long rid,@Param("pid")long pid);
	
	//x添加权限
	public void addRight(Right rig);	
	//删除权限
	public void delRight(long rid);
	//根据权限id查找一个权限
	public Right getByid(long id);
	//修改权限
	public void modRight(Right rig);
}
